﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _08Trapezoid
{
    class _08Trapezoid
    {
        static void Main(string[] args)
        {
            // Formula for area of a trapezoid ((a+b)/2)*h.
            Console.Write("Area of trapezoid.\nEnter values for the paralel sides:\na = ");
            decimal a = decimal.Parse(Console.ReadLine());
            Console.Write("b = ");
            decimal b = decimal.Parse(Console.ReadLine());
            Console.Write("Height? = ");
            decimal h = decimal.Parse(Console.ReadLine());
            decimal area = ((a + b) / 2) * h;
            Console.WriteLine("Area of trapezoid is " + area);
        }
    }
}
